package com.geologyoa.service;

import java.util.List;

import net.sf.json.JSONObject;

import com.geologyoa.domain.Cjdw01;
import com.geologyoa.domain.Dwqk01;
import com.geologyoa.domain.Dwzz01;
import com.geologyoa.domain.Function;
import com.geologyoa.domain.Power;
import com.geologyoa.domain.RoleAndPow;
import com.geologyoa.domain.Roles;
import com.geologyoa.domain.UserInfo;
import com.geologyoa.domain.Wpdj01;
import com.geologyoa.domain.Wpfj01;
import com.geologyoa.domain.Xmfj01;
import com.geologyoa.domain.Xmqk01;
import com.geologyoa.domain.Xmqk01New;
import com.geologyoa.domain.ZHD01;
import com.geologyoa.domain.Zjpf01;
import com.geologyoa.domain.xmqkQueryObj;
import com.geologyoa.persist.Dwqk01Dao;
import com.geologyoa.persist.Dwqk01DaoImpl;
import com.geologyoa.persist.Dwzz01Dao;
import com.geologyoa.persist.Dwzz01DaoImpl;
import com.geologyoa.persist.FunctionDao;
import com.geologyoa.persist.FunctionDaoImpl;
import com.geologyoa.persist.PowerDao;
import com.geologyoa.persist.PowerDaoImpl;
import com.geologyoa.persist.RolesDao;
import com.geologyoa.persist.RolesDaoImpl;
import com.geologyoa.persist.UserInfoDao;
import com.geologyoa.persist.UserInfoDaoImpl;
import com.geologyoa.persist.Wpdj01Dao;
import com.geologyoa.persist.Wpdj01DaoImpl;
import com.geologyoa.persist.Wpfj01Dao;
import com.geologyoa.persist.Wpfj01DaoImpl;
import com.geologyoa.persist.Xmqk01Dao;
import com.geologyoa.persist.Xmqk01DaoImpl;

/**
 * @author Administrator
 *
 */
/**
 * @author Administrator
 *
 */
public class SystemManagerImpl implements SystemManager {
  private Dwqk01Dao dwqk01Dao=new Dwqk01DaoImpl();
  private Dwzz01Dao dwzz01Dao=new Dwzz01DaoImpl();
  private Wpdj01Dao wpdj01Dao=new Wpdj01DaoImpl();
  private Wpfj01Dao wpfj01Dao=new Wpfj01DaoImpl();
  private RolesDao rolesDao=new RolesDaoImpl();
  private Xmqk01Dao xmqk01Dao=new Xmqk01DaoImpl();
  private UserInfoDao userInfoDao=new UserInfoDaoImpl();
  private FunctionDao functionDao=new FunctionDaoImpl();
  private PowerDao powerDao=new PowerDaoImpl();
	public Boolean AddDwqk(Dwqk01 dwqk01) {
		Boolean flag=dwqk01Dao.AddDwqk(dwqk01);
		return flag;
	}
	public Boolean CheckDwqkByName(String DWQK0103) {
		Boolean flag=dwqk01Dao.CheckDwqkByName(DWQK0103);
		return flag;
	}
	
	public  List<Wpfj01> SearchWpfj(String xmName, String wdName, String type) {
		 List<Wpfj01> list=wpdj01Dao.SearchWpfj(xmName,wdName,type);
		return list;
	}
	public Boolean CheckDwqkByIdAndZZTypeExceptZZid(int zzid, int dwid,
			String zzType) {
		Boolean flag = dwqk01Dao.CheckDwqkByIdAndZZTypeExceptZZid(zzid, dwid, zzType);
		return null;
	}
	public Boolean CheckDwqkByIdAndName(int id, String DWQK0103) {
		Boolean flag=dwqk01Dao.CheckDwqkByIdAndName(id, DWQK0103);
		return flag;
	}
	public Boolean CheckDwqkByIdAndZZType(int id, String zzType) {
		Boolean flag=dwqk01Dao.CheckDwqkByIdAndZZType(id, zzType);
		return flag;
	}
	public List<Dwqk01> SerachDwqk(String DWQK0102,String DWQK0103,String DWQK0104s,String DWQK0104e,String DWQK0105,String DWQK0107,String DWQK0108,String DWQK0110,String DWQK0116,String DWQK0117) {
		List<Dwqk01> list=dwqk01Dao.SearchDwqk(DWQK0102,DWQK0103, DWQK0104s,DWQK0104e,DWQK0105, DWQK0107,DWQK0108, DWQK0110,DWQK0116,DWQK0117);
		return list;
	}
	
	public List<Dwqk01> SerachDwqkByZZType(String DWQK0103, String DWQK0104,
			String DWQK0107, String DWQK0110, String ZZType, String ZZLevel) {
		List<Dwqk01> list=dwqk01Dao.SerachDwqkByZZType(DWQK0103, DWQK0104, DWQK0107, DWQK0110,ZZType,ZZLevel);
		return list;
	}
	public Boolean UpdateDwqk(Dwqk01 dwqk01) {
		Boolean flag=dwqk01Dao.UpdatDwqk(dwqk01);
		return flag;
	}
	public Boolean DelDwqk(String DWQK0101) {
		Boolean flag=dwqk01Dao.DelDwqk(DWQK0101);
		return flag;
	}
	public List<Dwqk01> SearchAllDwqk() {
		List<Dwqk01> list=dwqk01Dao.SearchAllDwqk();
		return list;
	}
	public boolean AddDwzz(Dwzz01 dwzz01) {
		Boolean flag=dwzz01Dao.AddDwzz(dwzz01);
		return flag;
	}
	public List<Dwzz01> SerachDwzz(String DWZZ0102,String DWZZ0103,String DWZZ0104,String DWZZ0105,String DWZZ0106,String DWZZ0109) {
		List<Dwzz01> list=dwzz01Dao.SerachDwzz(DWZZ0102,DWZZ0103,DWZZ0104,DWZZ0105,DWZZ0106,DWZZ0109);
		return list;
	}
	public Boolean DelDwzz(String DWZZ0101) {
		Boolean flag=dwzz01Dao.DelDwzz(DWZZ0101);
		return flag;
	}
	public Boolean CheckWpdj(String WPDJ0102) {
		Boolean flag=wpdj01Dao.CheckWpdj(WPDJ0102);
		return flag;
		
	}
	
	public Boolean CheckWpdjByNameExceptId(int id, String name) {
		Boolean flag=wpdj01Dao.CheckWpdjByNameExceptId(id,name);
		return flag;
	}
	public Boolean AddWpdj(Wpdj01 wpdj01) {
		Boolean flag=wpdj01Dao.AddWpdj(wpdj01);
		return flag;
	}
	public Boolean AddWpfj(Wpfj01 wpfj01) {
		Boolean flag=wpfj01Dao.AddWpfj(wpfj01);
		return flag;
	}
	/*public List<Wpdj01> SerachWpdj(String WPDJ0102, String WPDJ0105,
			String WPDJ0106) {
		List<Wpdj01> list=wpdj01Dao.SerachWpdj(WPDJ0102, WPDJ0105, WPDJ0106);
		return list;
	}*/
	
	public List<Wpdj01> SerachWpdj(String WPDJ0102,String WPDJ0103, String WPDJ0104,
			String WPDJ0105, String WPDJ0107, String WPDJ0108, String WPDJ0111,
			String WPDJ0113min, String WPDJ0113max, String WPDJ0114,
			String WPDJ0116, String WPDJ0119s, String WPDJ0119e,String WPDJ0122s,String WPDJ0122e,String WPDJ0118) {
		List<Wpdj01> list=wpdj01Dao.SerachWpdj(WPDJ0102,WPDJ0103, WPDJ0104, WPDJ0105, WPDJ0107, WPDJ0108, WPDJ0111, WPDJ0113min, WPDJ0113max, WPDJ0114, WPDJ0116, WPDJ0119s, WPDJ0119e, WPDJ0122s, WPDJ0122e, WPDJ0118);
		return list;
	}
	public Boolean UpdateDwzz(Dwzz01 dwzz01) {
		Boolean flag=dwzz01Dao.UpdateDwzz(dwzz01);
		return flag;
	}
	public Boolean DelWpdj(String wpdj0101) {
		Boolean flag=wpdj01Dao.DelWpdj(wpdj0101);
		return flag;
	}
	public Boolean UpdateWpdj(Wpdj01 wpdj01) {
		Boolean flag=wpdj01Dao.UpdateWpdj(wpdj01);
		return flag;
	}
	public List<Wpfj01> SearchFillPathWpfj(String WPFJ0102, String WPFJ0104) {
		List<Wpfj01> list=wpfj01Dao.SearchFillPathWpfj(WPFJ0102, WPFJ0104);
		return list;
	}
	public Boolean AddRoles(Roles roles) {
		Boolean flag=rolesDao.AddRoles(roles);
		return flag;
	}
	public List<Roles> SearchAllRoles() {
		List<Roles> list=rolesDao.SearchAllRoles();
		return list;
	}
	public Boolean CheckRoles(String RoleName) {
		Boolean flag=rolesDao.CheckRoles(RoleName);
		return flag;
	}
	public Boolean CheckRolesExceptId(String RoleName,String roleid){
		Boolean flag=rolesDao.CheckRolesExceptId(RoleName,roleid);
		return flag;
	}
	public Boolean AddUserInfo(UserInfo userInfo) {
		Boolean flag=userInfoDao.AddUserInfo(userInfo);
		return flag;
	}
	public Boolean CheckUserInfo(String username) {
		Boolean flag=userInfoDao.CheckUserInfo(username);
		return flag;
	}
	public Boolean CheckUserInfoExceptId(String username,String userId) {
		Boolean flag=userInfoDao.CheckUserInfoExceptId(username,userId);
		return flag;
	}
	public List<Function> SearchAllFunction() {
		List<Function> list=functionDao.SearchAllFunction();
		return list;
	}
	public Boolean AddPower(Power power) {
		Boolean flag=powerDao.AddPower(power);
		return flag;
	}
	public List<UserInfo> SearchUserInfo(String username, String password) {
		List<UserInfo> list=userInfoDao.SearchUserInfo(username, password);
		return list;
	}
	public List<RoleAndPow> SerachPower(Integer roleid) {
		List<RoleAndPow> list=powerDao.SerachPower(roleid);
		return list;
	}
	public Boolean UpdateUser(UserInfo userInfo) {
		Boolean flag=userInfoDao.UpdateUser(userInfo);
		return flag;
	}
	public List<UserInfo> SearchUser(String username, String nickname) {
		List<UserInfo> list=userInfoDao.SearchUser(username, nickname);
		return list;
	}
	public List<Roles> SearchRoles(String rolename) {
		List<Roles> list=rolesDao.SearchRoles(rolename);
		return list;
	}
	public Boolean DelUserInfo(String userid) {
		Boolean flag=userInfoDao.DelUserInfo(userid);
		return flag;
	}
	public Boolean DelRole(String roleid) {
		Boolean flag=rolesDao.DelRoleInfo(roleid);
		return flag;
	}
	public Boolean DelUserRoleID(String roleid) {
		Boolean flag=userInfoDao.DelUserInfo(roleid);
		return flag;
	}
	public Boolean UpdateRoleInfo(Roles roles) {
		Boolean flag=rolesDao.UpdateRoleInfo(roles);
		return flag;
	}
	public Boolean CheckUserInfoRoID(String roleid) {
		Boolean flag=userInfoDao.CheckUserInfoRoID(roleid);
		return flag;
	}
	public Boolean AddXmqk(Xmqk01 xmqk01) {
		Boolean flag=xmqk01Dao.AddXmqk(xmqk01);
		return flag;
	}
	public List<Xmqk01> SerachXmqk01(String xmqk01003, String xmqk01005,
			String xmqk01006, String minfy, String maxfy, String minjgtime,
			String maxjgtime,String xmqk01009) {
		List<Xmqk01> list=xmqk01Dao.SerachXmqk01(xmqk01003, xmqk01005, xmqk01006, minfy, maxfy, minjgtime, maxjgtime,xmqk01009);
		return list;
	}
	public Boolean DelXmqk(String xmqk01001) {
		Boolean flag=xmqk01Dao.DelXmqk(xmqk01001);
		return flag;
	}
	public Boolean UpdateXmqk(Xmqk01 xmqk01) {
		Boolean flag=xmqk01Dao.UpdateXmqk(xmqk01);
		return flag;
	}
	public List<Power> SearchFunction(Integer roleid, Integer functionid) {
		List<Power> list=powerDao.SearchFunction(roleid, functionid);
		return list;
	}
	public Boolean checkXmqkInfo(String xmName) {
		Boolean flag=xmqk01Dao.checkXmqkInfo(xmName);
		return flag;
	}
	public Boolean checkXmqkInfoExceptId(String xmName, int xmId) {
		Boolean flag=xmqk01Dao.checkXmqkInfoExceptId(xmName,xmId);
		return flag;
	}
	public Boolean updateWpfj(String wpfj0101, String wpfj0106, String type) {
		Boolean flag=wpdj01Dao.updateWpfj(wpfj0101, wpfj0106, type);
		return flag;
	}
	public List<Xmfj01> SearchXmfj(String xmName,String  fjName,String wdType,String wdsubType){
		List<Xmfj01> list=xmqk01Dao.SearchXmfj(xmName,fjName,wdType,wdsubType);
		return list;
	}
	public Boolean updateXmfj(String xmfj0101,String xmfj0106,String type) {
		Boolean flag=xmqk01Dao.updateXmfj(xmfj0101,xmfj0106,type);
		return flag;
	}
	public Boolean AddXmqk(Xmqk01New xmqk01, List<Zjpf01> zjpfList,
			List<Cjdw01> cjdwList, List<ZHD01> zhdList) {
		Boolean flag=xmqk01Dao.AddXmqk(xmqk01,zjpfList,cjdwList,zhdList);
		return flag;
	}
	public String SearchXmqk01(xmqkQueryObj obj) {
		String res = xmqk01Dao.SearchXmqk01(obj);
		return res;
	}
	public String SearchXmqkDetailsById(String id) {
		String res = xmqk01Dao.SearchXmqkDetailsById(id);
		return res;
	}
	public String searchWptjByWpbgId(String id) {
		String res = wpdj01Dao.searchWptjByWpbgId(id);
		return res;
	}
	public boolean deleteCjdwById(String id) {
		boolean bl= xmqk01Dao.deleteCjdwById(id);
		return bl;
	}
	public boolean deleteZjpfById(String id) {
		boolean bl= xmqk01Dao.deleteZjpfById(id);
		return bl;
	}
	public boolean deleteZhdById(String id){
		boolean bl = xmqk01Dao.deleteZhdById(id);
		return bl;
	}
	public boolean updateXmqk01ForOneToMany(Xmqk01New xmqk01,
			List<Zjpf01> zjpfList, List<Cjdw01> cjdwList, List<ZHD01> zhdList) {
		Boolean flag=xmqk01Dao.updateXmqk01ForOneToMany(xmqk01,zjpfList,cjdwList,zhdList);
		return flag;
	}
	public String statXmqk01(xmqkQueryObj obj){
		String res = xmqk01Dao.statXmqk01(obj);
		return res;
	}
	
}
